package com.gxwy.yonghuziliao.controller;

import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.gxwy.yonghuziliao.form.YongHuZiLiao;
import com.gxwy.yonghuziliao.service.YongHuZiLiaoService;

@Controller
@RequestMapping("yonghuziliao")
public class SelectController {

	
	@Autowired
	private YongHuZiLiaoService contactService;
	@RequestMapping("/zhuyecx")
	public String listContacts(Map<String, Object> map,HttpSession session) {
		String username=(String) session.getAttribute("username");
		map.put("contact",new YongHuZiLiao());
		map.put("contactList", contactService.findAll(username));
		
		return "zhuyecx";
	}

}

